<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="include/header.jsp" %>
<body onload="initWeb()">
<div class="main">
<div class="middle">
<div id=container>
      <div id="title">链接管理</div>
      <div id="toolBox" style="padding-left: 28px;padding-top: 10px;">
      	<a href="admin?m=getLinkPage">添加链接</a>
      </div>
      <div id="infoBox" style="margin-left: 28px;">
      	<table style="border-collapse: collapse;table-layout: fixed;;" border="1px;" width="700px">
      	<tr>
			<td width="30px;">序号</td><td width="200px;">名称</td><td width="410px;">地址</td><td width="60px;">操作</td>
		</tr>
		<c:forEach var="link" items="${linkList}" varStatus="xh" >
		<tr>
			<td>${xh.count }</td><td style="word-break: break-all;">${link.linkName }</td>
			<td style="word-break: break-all;">${link.linkUrl }</td>
			<td>
				<a href="admin?m=modiLink&lid=${link.id }">修改</a>
				<a href="admin?m=delLink&lid=${link.id }">删除</a>
			</td>
		</tr>
		</c:forEach>
      	</table>
      </div>
      <div id="pageBox" style="padding: 15px 25px;float: left;width: 100%;font-size: 14px;">
      <c:choose>
      <c:when test="${pageNo > 1}">
      	<a href="admin?m=linkMain&s=${pageSize }&p=${pageNo-1 }">上一页</a>
      </c:when>
      <c:otherwise>
      	<a href="javascript:alert('没有上一页了!');">上一页</a>
      </c:otherwise>
      </c:choose>
      <c:choose>
      <c:when test="${pageNo < allPage}">
      	<a href="admin?m=linkMain&s=${pageSize }&p=${pageNo+1 }">下一页</a>
      </c:when>
      <c:otherwise>
      	<a href="javascript:alert('没有下一页了!');">下一页</a>
      </c:otherwise>
      </c:choose>
      </div>
    </div>
</div>  
</div>
</body>
</html>
